package com.springboot.base.common;

public class BusinessException extends Exception{

    private CommonError commonError;

    public BusinessException(EmBusinessError error) {
        super();
        this.commonError = new CommonError(error);
    }

    public BusinessException(EmBusinessError error,String errorMsg){
        super();
        this.commonError = new CommonError(error);
        this.commonError.setErrMsg(errorMsg);
    }

    public CommonError getCommonError() {
        return commonError;
    }

    public void setCommonError(CommonError commonError) {
        this.commonError = commonError;
    }
}

